import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入您的卡号");
        int x= sc.nextInt();
        int a=x/1000%10;
        int b=x/100%10;
        int c=x/10%10;
        int d=x%10;
        int sum=a+b+c+d;
        System.out.println("您的卡号个位数为："+d);
        System.out.println("您的卡号十位数为："+c);
        System.out.println("您的卡号百位数为："+b);
        System.out.println("您的卡号千位数为："+a);
        System.out.println("您的卡号所有数之和为"+sum);
        String prize= sum%8==0 && a!=8 && b!=8 && c!=8 && d!=8 ? "true":"false";
        System.out.println(prize);
    }
}
